<?php
/**
 * Created by PhpStorm.
 * User: MrHung
 * Date: 1/22/14
 * Time: 5:26 PM
 */

namespace Frontend\Controller;


use Zend\Mvc\Controller\AbstractActionController;
use Zend\Authentication\Validator\Authentication;
use Zend\Authentication\AuthenticationService;
use Zend\Validator\File\UploadFile;
use Zend\View\Model\ViewModel;
use Admin\Model\AdminUser;
use \Velacolib\Utility\Utility;
use Zend\Form\Form;
use Zend\Form\Element;

class LogoutController extends AbstractActionController
{
    public function onDispatch(\Zend\Mvc\MvcEvent $e)
    {
        $this->layout('frontend/layout');
        return parent::onDispatch($e);
    }
    public function indexAction(){
        $auth = new AuthenticationService();
        $auth->clearIdentity();
        return $this->redirect()->toRoute('home', array(
            'controller' => 'home',
        ));
    }

} 